import { useContext } from "react";
import MyContext from "../../utils/myContext";
import { Observer } from "mobx-react";
const Test = () => {
  const store = useContext(MyContext);
  return (
    <Observer>
      {() => {
        return (
          <div
            style={{
              width: "100%",
              height: "100%",
              display: "flex",
              alignItems: "center",
              justifyContent: "center",
              flexDirection: "column",
            }}
          >
            <div>TestPage</div>
            <h3>axios请求参考HomePage</h3>
            <div>{store.data}data--具体见text.js</div>
            <div>{store.ycyDate}</div>
            <button
              onClick={() => {
                store.changeDate();
              }}
            >
              TestChangeYcyDate
            </button>
          </div>
        );
      }}
    </Observer>
  );
};
export default Test;
